-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix err 500 on listing /api/v1/namespaces with browsable api enabled #1915
Fix err 500 on listing /api/v1/namespaces with browsable api enabled #1915
Conversation
@drodowic Is it okay to use the |
PULP_CONTENT_ORIGIN is explicitly set in each environment for galaxy.ansible.com so yes I think it's unique enough to use in this case. |
eae2013
to
3bc42ee
Compare
Does this problem exist on the devstack in a way that we could have reproduced it? |
@jctanner I can probably add test with |
Issue: AAH-2733
Issue: AAH-2733
Issue: AAH-2733
Issue: AAH-2733
Issue: AAH-2733
Issue: AAH-2733
Issue: AAH-2733
Issue: AAH-2733
Issue: AAH-2733
3bc42ee
to
72d040c
Compare
Issue: AAH-2733
Issue: AAH-2733
This feels like a hacky fix. I'm not sure why django says the method is POST on visiting the endpoint if browsable api is enabled.For some reason, django browsable api form make POST (create) request which triggers access policy (
is_namespace_owner
) just on visiting endpoint.With browsable api enabled: visiting endpoint "request.method" is "POST", "action" is "create", even though request.META["REQUEST_METHOD"] is "GET".
(if
?format=json
, endpoint works correctly even basic user is logged in)Still investigating.